package com.atguigu.cloud.controller;

import com.atguigu.cloud.domain.Music;
import com.atguigu.cloud.result.Result;
import com.atguigu.cloud.service.MusicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 用戶表
 */
@RequestMapping("/music")
@RestController
public class MusicController {

    @Autowired
    private MusicService musicService;

    @RequestMapping("getMusicList")
    public Result<List<Music>> getUserList() {
        return Result.success(musicService.list());
    }

}
